Skip to content

Conversation

@jemayn
Copy link
Contributor

@jemayn jemayn commented Dec 1, 2025

📋 Description

I've recently spent way more time than I'd like to admit on figuring out how to add a weight onto a product in Umbraco Commerce when fetching products through a Product Adapter.
This PR adds a note on the other extended IProductSnapshot interfaces that add additional data to your product that may be useful.

✅ Contributor Checklist

I've followed the Umbraco Documentation Style Guide and can confirm that:

  • Code blocks are correctly formatted.
  • Sentences are short and clear (preferably under 25 words).
  • Passive voice and first-person language (“we”, “I”) are avoided.
  • Any code examples or instructions have been tested.

Product & Version (if relevant)

I've been working on Umbraco Commerce 16.4.1, but I'd assume it to be the same for all other versions.

📚 Helpful Resources

Copy link
Contributor

@sofietoft sofietoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @jemayn !

I've made some small suggestions (read: I've totally rewritten your PR, sorry! 🙈 )
Please take a look, and tell me what you think!

```

{% hint style="info" %}
`IProductSnapshot` is the base model for what Umbraco Commerce needs. If you want to include images or measurements (for example, if you need weight-based shipping), then there are other interfaces you can return.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've attempted to make these sentences more direct. What do you think?

Suggested change
`IProductSnapshot` is the base model for what Umbraco Commerce needs. If you want to include images or measurements (for example, if you need weight-based shipping), then there are other interfaces you can return.
`IProductSnapshot` is the base model for enriching the Umbraco Commerce product model. To include images or custom measurements, such as weight-based shipping, more specific interfaces are available.


{% hint style="info" %}
`IProductSnapshot` is the base model for what Umbraco Commerce needs. If you want to include images or measurements (for example, if you need weight-based shipping), then there are other interfaces you can return.
`IProductSnapshotWithImage`, `IProductSnapshotWithCategories` & `IProductSnapshotWithMeasurements` are all valid return types that allows you to enrich the product model.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if there are in fact more available interfaces - you probably know that better than me ;)
But how about we use a list here? 🤔

Suggested change
`IProductSnapshotWithImage`, `IProductSnapshotWithCategories` & `IProductSnapshotWithMeasurements` are all valid return types that allows you to enrich the product model.
Valid interfaces include, but are not limited to:
* `IProductSnapshotWithImage`
* `IProductSnapshotWithCategories`
* `IProductSnapshotWithMeasurements`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants